package com.lanou3g.ptp.api.utils;

public class PtpResultUtils {
    private static final int DEFAULT_SUCCESS_CODE = 200;
    private static final String DEFAULT_SUCCESS_MESSAGE = "ok";

    public static PtpResult ok() {
        PtpResult ptpResult = new PtpResult();
        ptpResult.setCode(DEFAULT_SUCCESS_CODE);
        ptpResult.setMessage(DEFAULT_SUCCESS_MESSAGE);
        return ptpResult;
    }

    public static PtpResult ok(Object data) {
        PtpResult ptpResult = ok();
        ptpResult.setData(data);
        return ptpResult;
    }
}
